/**
 * Copyright (C), 2015-2019, XXX有限公司
 * FileName: NewerMultyDiscount
 * Author:   zhouheng
 * Date:     2019/5/1 23:21
 * Description: 首次购买
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.zhouh.patterns.com.zhouh.action.chain;

/**
 * 〈一句话功能简述〉<br> 
 * 〈首次购买〉
 *
 * @author zhouheng
 * @create 2019/5/1
 * @since 1.0.0
 */
public class NewerMultyDiscount extends MultyDiscount {
    public NewerMultyDiscount(MultyDiscount next) {
        super(next);
    }

    @Override
    public int calculate(int money) {
        if (money > 100){
            System.out.println("首次购买减20元");
            money = money - 20;
        }

        return super.calculate(money);
    }
}